package com.tyut.springboottest.service;

import com.tyut.springboottest.domin.Student;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Service;

@Service
@EnableConfigurationProperties(Student.class)
public class StudentService {
    // 注入 student 对象
    private final Student student;

    // 构造器注入
    public StudentService(Student student) {
        this.student = student;
    }

    public Student getStudent() {
        // 返回 student 对象
        return student;
    }
}